
/* start /web-platform/scripts/web-platform/helpers/buffer.js*/
SOE.Buffer=function(prop){this._buffer=[];this._active=false;this._waitCount=0;this.speed=prop.speed||50;this.fireSpeed=prop.fireSpeed||10;this.waitExp=prop.waitExp||15;if(typeof prop.trigger==="undefined"){return;}
this.trigger=prop.trigger;if(prop.wait){$(document).ready(this._test.bind(this));}else{this._test();}};SOE.Buffer.prototype.add=function(func){this._buffer.push(func);if(this._active){this._fire();}};SOE.Buffer.prototype._fire=function(){var _func;if(this._buffer.length>0){_func=this._buffer.shift();_func();setTimeout(function(){this._fire();}.bind(this),this.fireSpeed);}};SOE.Buffer.prototype._test=function(){if(this.trigger()){this._active=true;this._fire();}else{setTimeout(this._test.bind(this),this.speed);}};

/* end /web-platform/scripts/web-platform/helpers/buffer.js*/

/* start /web-platform/scripts/web-platform/track/tracker.js*/
SOE.Tracker=function(props){'use strict';if(typeof props==='object'){this.page=props.page||{};this.evnt=props.evnt||{};this.vst=props.vst||{};}else{this.page={};this.evnt={};this.vst={};}
const bufferTrigger=this.isGA4?'gtag':'ga';this.buffer=new SOE.Buffer({speed:1000,wait:true,trigger:()=>typeof window[bufferTrigger]!=='undefined'});if(globs.wdl.wdlCookDNT){return false;}
if(this.isGA4){this._clickTrackingGA4();this._shareTrackingGA4();this._selectContentTrackingGA4();}else{this._clickTracking();this._socialTracking();}};Object.defineProperty(SOE.Tracker.prototype,'isGA4',{configurable:true,get(){'use strict';delete SOE.Tracker.prototype.isGA4;SOE.Tracker.prototype.isGA4=true;return SOE.Tracker.prototype.isGA4;}});SOE.Tracker.prototype.visitCookie=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
var _cookieData;var _expires=new Date(new Date().getTime()+157680000000);if(wpCookie('dtVisInfo')){_cookieData=wpCookie('dtVisInfo').split(':');this.vst.visitNumber=parseInt(_cookieData[0],10);if(!wpCookie('dtVisTmr')){this.vst.visitNumber+=1;this.vst.firstPage=true;}
this.vst.pageNumber=parseInt(_cookieData[1],10)+1;this.vst.timeOfFirstVisit=parseInt(_cookieData[2],10);}else{this.vst.visitNumber=1;this.vst.pageNumber=1;this.vst.timeOfFirstVisit=new Date().getTime();this.vst.firstPage=true;}
_cookieData=[this.vst.visitNumber,this.vst.pageNumber,this.vst.timeOfFirstVisit];wpCookie('dtVisInfo',_cookieData.join(':'),_expires);this.vst.referrer=this.documentReferrer();if(globs.wdl.gvidEnabled){this.vst.visitorID=wpCookie('soegvid');}else{this.vst.visitorID='';}
this._setVisitTimer();};SOE.Tracker.prototype._setVisitTimer=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
var _expires=new Date(new Date().getTime()+1800000);wpCookie('dtVisTmr',true,_expires);};SOE.Tracker.prototype.setTimeLapse=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
var _time=new Date().getTime();if(this.vst.timeOfFirstVisit!=='undefined'&&typeof this.vst.timeOfFirstVisit!=='undefined'){_time-=parseInt(this.vst.timeOfFirstVisit,10);if(_time<3600000){_time=`${ Math.floor(_time / 60000) }mins`;}else if(_time<86400000){_time=`${ Math.floor(_time / 3600000) }hours`;}else{_time=`${ Math.floor(_time / 86400000) }days`;}
this.evnt.timeLapse=_time;}};SOE.Tracker.prototype.getPageName=function(gameName){'use strict';if(globs.wdl.wdlCookDNT){return false;}
var _pageName=window.location.pathname.replace(/^(\/)|(\.[^/]+?)$/g,'').replace(/\//g,' : ');_pageName=_pageName||'home';_pageName=`${ gameName } : ${ _pageName.toLowerCase() }`;return _pageName;};SOE.Tracker.prototype.mapGoogleAnalyticsData=function(obj){'use strict';var i,result={};var map=[['pageName','page'],['location','location'],['language','dimension1'],['splitTestName','dimension4'],['splitTestVersion','dimension5'],['timeLapse','dimension7'],['platform','dimension8'],['campaign','dimension9'],['campaign','campaignId'],['campaignName','campaignName'],['campaignSource','campaignSource'],['campaignMedium','campaignMedium'],['campaignKeyword','campaignKeyword'],['campaignContent','campaignContent'],['userId','userId'],['eventAction','eventAction'],['eventCategory','eventCategory'],['eventLabel','eventLabel'],['eventValue','eventValue'],['noninteraction','noninteraction'],['socialNetwork','socialNetwork'],['socialAction','socialAction'],['socialTarget','socialTarget']];for(i=0;i<map.length;++i){if(Object.hasOwnProperty.call(obj,map[i][0])){result[map[i][1]]=obj[map[i][0]];}}
return result;};SOE.Tracker.prototype.trackPageView=function(override){'use strict';if(this.isGA4){return;}
if(globs.wdl.wdlCookDNT){return false;}
var _prop,_data={};for(_prop in this.evnt){if(Object.hasOwnProperty.call(this.evnt,_prop)){_data[_prop]='';}}
if(override){for(_prop in override){if(Object.hasOwnProperty.call(override,_prop)){this.page[_prop]=override[_prop];}}}
for(_prop in this.vst){if(Object.hasOwnProperty.call(this.vst,_prop)){_data[_prop]=this.vst[_prop];}}
for(_prop in this.page){if(Object.hasOwnProperty.call(this.page,_prop)){_data[_prop]=this.page[_prop];}}
this.buffer.add(function(){ga('send','pageview',SOE.Tracker.prototype.mapGoogleAnalyticsData(_data));});};SOE.Tracker.prototype.trackGA4Event=function(event,params){'use strict';if(!this.isGA4){return;}
this.buffer.add(function(){gtag('event',event,params||{});});};SOE.Tracker.prototype.trackEvent=function(override,hitType){'use strict';if(this.isGA4){return;}
if(globs.wdl.wdlCookDNT){return false;}
var _prop,_data={};this.setTimeLapse();if(override){for(_prop in override){if(Object.hasOwnProperty.call(override,_prop)){this.evnt[_prop]=override[_prop];}}}
for(_prop in this.vst){if(Object.hasOwnProperty.call(this.vst,_prop)){_data[_prop]=this.vst[_prop];}}
for(_prop in this.page){if(Object.hasOwnProperty.call(this.page,_prop)){_data[_prop]=this.page[_prop];}}
for(_prop in this.evnt){if(Object.hasOwnProperty.call(this.evnt,_prop)){_data[_prop]=this.evnt[_prop];}}
this.buffer.add(function(){ga('send',hitType||'event',SOE.Tracker.prototype.mapGoogleAnalyticsData(_data));});for(_prop in this.evnt){if(Object.hasOwnProperty.call(this.evnt,_prop)){this.evnt[_prop]='';}}};SOE.Tracker.prototype.trackFunnelEvent=function(eventType,data,optionsParam,requestedGvidImage){'use strict';if(globs.wdl.wdlCookDNT){return false;}
const options=optionsParam||{};if(globs.wdl.gvidEnabled){var _cid,_debug='';if(!wpCookie('soegvid')){_debug='NO GVID COOKIE';if(typeof soeGvidSuccess!=='undefined'){if(typeof soeGvidValue!=='undefined'&&soeGvidValue!=='null'){wpCookie('soegvid',soeGvidValue,1095);if(!wpCookie('soegvid')){_debug='NO COOKIES';}}else if(typeof soeGvidValue!=='undefined'&&soeGvidValue==='null'){_debug='GVID VALUE IS NULL';}else{_debug='GVID VALUE IS UNDEFINED';}}}
if(options.campaignAttribution===30){_cid=wpCookie('cmpID30')||'';}else{_cid=this.page.campaign||'';}
var _funnelData={eventType:eventType,gameCode:this.page.game,referringURL:this.vst.referrer||'',cid:_cid,debug:_debug};$.extend(_funnelData,data);$.ajax({url:'/send-event',type:'POST',data:_funnelData});}};SOE.Tracker.prototype.receiveEvent=function(evnt,func){'use strict';if(globs.wdl.wdlCookDNT){return false;}
$(document).on(`dtkr_${ evnt }`,func);};SOE.Tracker.prototype.sendEvent=function(evnt,data){'use strict';if(globs.wdl.wdlCookDNT){return false;}
$(document).trigger(`dtkr_${ evnt }`,data);};SOE.Tracker.prototype._collectGA4Params=function(el){'use strict';const params={};const paramAttributePrefixLength=15;for(const attr of el.attributes){if(/^data-ga4-param-[a-z][a-z0-9_]*[a-z0-9]$/gi.test(attr.name)){const valueTrimmed=attr.value.trim();if(valueTrimmed[0]==='{'||valueTrimmed[0]==='['){params[attr.name.slice(paramAttributePrefixLength)]=JSON.parse(valueTrimmed);}else if(/^-?\d/gi.test(valueTrimmed)){params[attr.name.slice(paramAttributePrefixLength)]=parseFloat(valueTrimmed);}else{params[attr.name.slice(paramAttributePrefixLength)]=valueTrimmed;}}}
return params;};SOE.Tracker.prototype._clickTrackingGA4=function(){'use strict';if(globs.wdl.wdlCookDNT){return;}
const tracker=this;$('body').on('mousedown','[data-ga4-event]',function(e){if(e.button!==0){return;}
const el=e.currentTarget;const event=el.getAttribute('data-ga4-event');if(event){const params=tracker._collectGA4Params(el);tracker.trackGA4Event(event,params);}});};SOE.Tracker.prototype._shareTrackingGA4=function(){'use strict';if(globs.wdl.wdlCookDNT){return;}
const tracker=this;$('body').on('mousedown','[data-ga4-share]',function(e){if(e.button!==0){return;}
const el=e.currentTarget;const[method,content_type,...item_id_parts]=el.getAttribute('data-ga4-share').split(':');const item_id=item_id_parts.join(':');const params=tracker._collectGA4Params(el);tracker.trackGA4Event('share',{method,content_type,item_id,...params});});};SOE.Tracker.prototype._selectContentTrackingGA4=function(){'use strict';if(globs.wdl.wdlCookDNT){return;}
const tracker=this;$('body').on('mousedown','[data-ga4-select-content]',function(e){if(e.button!==0){return;}
const el=e.currentTarget;const[content_type,...item_id_parts]=el.getAttribute('data-ga4-select-content').split(':');const item_id=item_id_parts.join(':');const params=tracker._collectGA4Params(el);tracker.trackGA4Event('select_content',{content_type,item_id,...params});});};SOE.Tracker.prototype._clickTracking=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
$('body').on('mousedown','[data-ga-label]',function(evnt){var options={};var $target=$(evnt.currentTarget);options.eventLabel=String($target.data('ga-label')).toLowerCase();var action=$target.closest('[data-ga-action]');if(action.length>0){options.eventAction=String(action.data('ga-action')).toLowerCase();}
var value=$target.closest('[data-ga-value]');if(value.length>0){options.eventValue=String(value.data('ga-value')).toLowerCase();}
var category=$target.closest('[data-ga-category]');options.eventCategory=String((category.length===1)?category.data('ga-category'):'page interaction').toLowerCase();if(options.eventLabel&&options.eventAction){this.trackEvent(options);}}.bind(this));};SOE.Tracker.prototype._socialTracking=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
$('body').on('mousedown','[data-ga-social]',function(evnt){var socialData=$(evnt.currentTarget).data('ga-social');if(typeof socialData==='string'){socialData=socialData.split(':');if(typeof socialData[1]!=='undefined'){var socialTarget=(socialData.length>2?socialData.slice(2).join(':'):window.location.href);this.trackEvent({socialNetwork:socialData[0],socialAction:socialData[1],socialTarget:socialTarget},'social');}}}.bind(this));};SOE.Tracker.prototype.documentReferrer=function(){'use strict';if(globs.wdl.wdlCookDNT){return false;}
var _referrer=document.referrer.split('?')[0];_referrer=_referrer.replace(/[^\d\w./:-_~]/,'');if(!/station\.sony\.com/.test(_referrer)&&!/auth.*\.soe\.com/.test(_referrer)&&_referrer.indexOf(document.domain)===-1){wpCookie('dtRfer',encodeURIComponent(_referrer));}
if(wpCookie('dtRfer')){return decodeURIComponent(wpCookie('dtRfer'));}else{return'';}};SOE.Tracker.prototype.loadTags=function(referenceName,customParams){'use strict';var i,prop,htmlString;var group=globs.wdl.trackingTagGroupsConsented[referenceName];var $body=$('body');if(Array.isArray(group)){for(i=0;i<group.length;++i){try{htmlString=group[i].replace('{NOCACHE}',Date.now());if(customParams){for(prop in customParams){if(Object.hasOwnProperty.call(customParams,prop)){htmlString=htmlString.replace(prop,customParams[prop]);}}}
$body.append(htmlString);}catch(e){}}}};SOE.Tracker.prototype._completeLangWeight=function(lang){'use strict';var split;if(lang.indexOf(';')>0){split=lang.trim().split(';');return{lang:split[0].trim(),quality:parseFloat(split[1].trim().slice(2))};}else{return{lang:lang.trim(),quality:1};}};SOE.Tracker.prototype._addLanguageIndices=function(lang,index){'use strict';return $.extend({},lang,{index:index});};SOE.Tracker.prototype._sortLanguages=function(a,b){'use strict';if(a.quality===b.quality){return a.index-b.index;}else{return b.quality-a.quality;}};SOE.Tracker.prototype._determineLocale=function(acceptLanguage){'use strict';var sortedLangs=acceptLanguage.split(',').map(this._completeLangWeight).map(this._addLanguageIndices).sort(this._sortLanguages);return sortedLangs[0].lang;};SOE.Tracker.prototype._determineOS=function(){'use strict';if(window.navigator.userAgent.indexOf('Windows NT 10.0')!==-1){return'Windows 10';}
if(window.navigator.userAgent.indexOf('Windows NT 6.2')!==-1){return'Windows 8';}
if(window.navigator.userAgent.indexOf('Windows NT 6.1')!==-1){return'Windows 7';}
if(window.navigator.userAgent.indexOf('Windows NT 6.0')!==-1){return'Windows Vista';}
if(window.navigator.userAgent.indexOf('Windows NT 5.1')!==-1){return'Windows XP';}
if(window.navigator.userAgent.indexOf('iPhone')!==-1){return'iOS';}
if(window.navigator.userAgent.indexOf('iPad')!==-1){return'iOS';}
if(window.navigator.userAgent.indexOf('Mac')!==-1){return'Mac OS';}
if(window.navigator.userAgent.indexOf('Android')!==-1){return'Android';}
if(window.navigator.userAgent.indexOf('Linux')!==-1){return'Linux';}};SOE.Tracker.prototype.collectRedShellData=function(acceptLanguage){'use strict';return{resolution:`${ window.screen.width }x${ window.screen.height }`,timezoneoffset:new Date().getTimezoneOffset(),locale:this._determineLocale(acceptLanguage),os:this._determineOS()};};

/* end /web-platform/scripts/web-platform/track/tracker.js*/

/* start /web-platform/scripts/web-platform/track/data-layer.js*/
populateURLParams();if(globs.wdl.wdlCookDNT){window.DTKR=new SOE.Tracker(window.DTKR);$(function(){'use strict';if(wpCookie('wdlCookDNT')>0){wpCookie.purgeDNTCookies();var cookieValue=wpCookie('wdlCookDNT');$.get('/cookie/set',{name:'wdlCookDNT',value:++cookieValue,responseType:'js'},function(){},'script');}});}else{window.DTKR=new SOE.Tracker(window.DTKR);(function(){'use strict';var _pageName=DTKR.getPageName(`${ globs.wdl.game } : ${ globs.wdl.business }`);var _page={pageName:_pageName,siteName:globs.wdl.game,platform:globs.wdl.scope,language:globs.wdl.language,locale:globs.soelocale,pageID:globs.wdl.pageID,pageType:globs.wdl.pageType,env:globs.wdl.env,game:globs.wdl.game,productArray:globs.wdl.productArray,skuArray:globs.wdl.skuArray,userId:wpCookie('soegvid')};var param;var paramMap={utm_campaign:'campaignName',utm_source:'campaignSource',utm_medium:'campaignMedium',utm_keyword:'campaignKeyword',utm_content:'campaignContent'};for(param in paramMap){if(Object.hasOwnProperty.call(paramMap,param)&&Object.hasOwnProperty.call(globs.urlparameters,param)){_page[paramMap[param]]=globs.urlparameters[param];}}
if(globs.wdl.cid!==''){_page.campaign=globs.wdl.cid;}
$.extend(DTKR.page,_page);}());DTKR.receiveEvent('webRegStart',function(){'use strict';DTKR.trackFunnelEvent('REGISTRATION_START',null,{campaignAttribution:30});DTKR.trackEvent({eventLabel:'registration start',eventAction:'registration',eventCategory:'funnel event'});DTKR.trackGA4Event('start_registration');});DTKR.receiveEvent('webRegComplete',function(evt,data){'use strict';DTKR.trackEvent({eventLabel:'registration complete',eventAction:'registration',eventCategory:'funnel event'});DTKR.trackGA4Event('complete_registration');DTKR.trackFunnelEvent('REGISTRATION_COMPLETE',data,{campaignAttribution:30});});DTKR.receiveEvent('downloadInstaller',function(evt,data){'use strict';DTKR.trackEvent({eventLabel:'installer download',eventAction:'download',eventCategory:'funnel event'});DTKR.trackGA4Event('download_installer');var autoDownload=false;if(typeof data!=='undefined'){autoDownload=Boolean(data.autoDownload);}
DTKR.trackFunnelEvent('LAUNCHER_DOWNLOAD_STARTED',{autoDownload:autoDownload},{campaignAttribution:30});});DTKR.receiveEvent('webBetaRegDisplayed',function(){'use strict';DTKR.trackEvent({eventLabel:'beta registation start',eventAction:'beta registration',eventCategory:'beta signup'});DTKR.trackGA4Event('start_beta_registration');});DTKR.receiveEvent('webNewBetaSignup',function(){'use strict';DTKR.trackEvent({eventLabel:'beta registration complete new account',eventAction:'beta registration',eventCategory:'beta signup'});DTKR.trackGA4Event('complete_beta_registration',{new_account:true});});DTKR.receiveEvent('webBetaSignup',function(){'use strict';DTKR.trackEvent({eventLabel:'beta registration complete',eventAction:'beta registration',eventCategory:'beta signup'});DTKR.trackGA4Event('complete_beta_registration',{new_account:false});});$(document).ready(function(){'use strict';if(DTKR.vst.firstPage||(typeof globs.urlparameters!=='undefined'&&globs.urlparameters.cid)){DTKR.trackFunnelEvent('WEBPAGE_VIEWED',null,{campaignAttribution:'session'});}});}

/* end /web-platform/scripts/web-platform/track/data-layer.js*/

/* start /web-platform/scripts/web-platform/track/cookie-consent.js*/
window.DGC=window.DGC||{};window.DGC.CookieConsent=window.DGC.CookieConsent||{};window.DGC.CookieConsent.Helpers=window.DGC.CookieConsent.Helpers||{};window.DGC.CookieConsent.Helpers.partition=function(list,predicate){'use strict';var result=[[],[]];list.forEach(function(item){result[(predicate(item)?0:1)].push(item);});return result;};window.DGC.CookieConsent.Helpers.appendTags=function(tags){'use strict';if(tags){tags.forEach(tag=>$('body').append(tag));}};window.DGC.CookieConsent.Helpers.consentToPageTags=function(predicate){'use strict';if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)){window.DGC.CookieConsent.Helpers.appendTags(globs.wdl.trackingPageLoadTags.filter(predicate));}};window.DGC.CookieConsent.Helpers.consentToLateTags=function(predicate){'use strict';if(globs.wdl.trackingTagGroups){if(!globs.wdl.trackingTagGroupsConsented){globs.wdl.trackingTagGroupsConsented={};}
_.each(globs.wdl.trackingTagGroups,function(val,key){const[passedTags,rejectedTags]=window.DGC.CookieConsent.Helpers.partition(val,predicate);if(passedTags.length>0){if(!globs.wdl.trackingTagGroupsConsented[key]){globs.wdl.trackingTagGroupsConsented[key]=[];}
globs.wdl.trackingTagGroupsConsented[key]=_.union(globs.wdl.trackingTagGroupsConsented[key],passedTags);globs.wdl.trackingTagGroups[key]=rejectedTags;}});}};window.DGC.CookieConsent.Helpers.anyMatchingTags=function(predicate){'use strict';if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)&&globs.wdl.trackingPageLoadTags.filter(predicate).length>0){return true;}
var group;for(group in globs.wdl.trackingTagGroups){if(Object.hasOwnProperty.call(globs.wdl.trackingTagGroups,group)&&Array.isArray(globs.wdl.trackingTagGroups[group])){if(globs.wdl.trackingTagGroups[group].filter(predicate).length>0){return true;}}}
return false;};window.DGC.CookieConsent.Helpers.copyAttributes=function(attributes,srcElement,targetElement){'use strict';attributes.forEach(function(attr){if(srcElement.getAttribute(attr)){targetElement.setAttribute(attr,srcElement.getAttribute(attr));}});};window.DGC.CookieConsent.Helpers.whitelistCookies=function(keys){'use strict';if(globs.wdl.cookieWhitelist&&Array.isArray(globs.wdl.cookieWhitelist)){globs.wdl.cookieWhitelist=_.union(globs.wdl.cookieWhitelist,keys);}};window.DGC.CookieConsent.youtubeApi=function(tarteaucitron){'use strict';(tarteaucitron.job=tarteaucitron.job||[]).push('youtubeapi');};window.DGC.CookieConsent.youtubeIframes=function(tarteaucitron){'use strict';function findYouTubeId(url){var idSniff=/(?:youtube\.com\/(?:[^/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i;var matches=url.match(idSniff);return(matches&&matches.length>=2)?matches[1]:null;}
$('iframe, span[data-was-iframe]').filter(function(i,el){return Boolean(findYouTubeId(el.getAttribute('src')));}).each(function(i,el){try{var videoId=findYouTubeId(el.getAttribute('src'));var replacement=document.createElement('div');replacement.setAttribute('videoID',videoId);replacement.setAttribute('class','youtube_player');window.DGC.CookieConsent.Helpers.copyAttributes(['width','height','theme','rel','controls','showinfo','autoplay'],el,replacement);$(el).replaceWith(replacement);}catch(e){}});(tarteaucitron.job=tarteaucitron.job||[]).push('youtube');};window.DGC.CookieConsent.iframes=function(tarteaucitron){'use strict';var $allIframes=$('iframe, span[data-was-iframe]');if($allIframes.length>0){$allIframes.each(function(i,el){try{var replacement=document.createElement('div');replacement.setAttribute('class','tac_iframe');window.DGC.CookieConsent.Helpers.copyAttributes(['width','height'],el,replacement);if(el.getAttribute('src')){replacement.setAttribute('data-url',el.getAttribute('src'));}
$(el).replaceWith(replacement);}catch(e){}});(tarteaucitron.job=tarteaucitron.job||[]).push('iframe');}};window.DGC.CookieConsent.dgcGvid=function(tarteaucitron){'use strict';if(globs.wdl.gvidEnabled){tarteaucitron.services.dgcGvid={key:'dgcGvid',type:'analytic',name:'Daybreak Global Visitor ID',needConsent:true,cookies:['soegvid'],js:function(){window.DGC.CookieConsent.Helpers.whitelistCookies(tarteaucitron.services.dgcGvid.cookies);var gvidPath=globs.wdl.gvidPath||'/gvid-one';if(wpCookie('soegvid')){document.createElement('img').src=gvidPath;}else if(gvidPath.indexOf('?')>=0){tarteaucitron.addScript(`${ gvidPath }&amp;format=js`);}else{tarteaucitron.addScript(`${ gvidPath }?format=js`);}}};(tarteaucitron.job=tarteaucitron.job||[]).push('dgcGvid');}};window.DGC.CookieConsent.dgcVisited=function(tarteaucitron){'use strict';tarteaucitron.services.dgcVisited={key:'dgcVisited',type:'other',name:`${ globs.wdl.gameName || 'Site' } Saw Registration Page`,needConsent:false,cookies:[`${ globs.wdl.sitePrefix }_visited`],js:function(){window.DGC.CookieConsent.Helpers.whitelistCookies(tarteaucitron.services.dgcVisited.cookies);if(!wpCookie(`${ globs.wdl.sitePrefix }_visited`)){wpCookie(`${ globs.wdl.sitePrefix }_visited`,true,30);}}};tarteaucitron.services.dgcVisited.js();};window.DGC.CookieConsent.dgcAnalyticsSupport=function(tarteaucitron){'use strict';tarteaucitron.services.dgcAnalyticsSupport={key:'dgcAnalyticsSupport',type:'analytic',name:'Daybreak Analytics Extensions',needConsent:true,cookies:['dtRfer','dtVisInfo','dtVisTmr','cid','cmpID30'],js:function(){window.DGC.CookieConsent.Helpers.whitelistCookies(tarteaucitron.services.dgcAnalyticsSupport.cookies);if(DTKR&&typeof DTKR.visitCookie==='function'){DTKR.visitCookie();}
if(typeof globs.wdl.cid!=='undefined'&&globs.wdl.cid){wpCookie('cid',globs.wdl.cid,30);wpCookie('cmpID30',globs.wdl.cid,30);}}};(tarteaucitron.job=tarteaucitron.job||[]).push('dgcAnalyticsSupport');};window.DGC.CookieConsent.dgcAnalytics=function(tarteaucitron){'use strict';if(globs.wdl.googleAnalyticsId){tarteaucitron.services.dgcAnalytics={key:'dgcAnalytics',type:'analytic',name:'Google Analytics (universal)',uri:'https://support.google.com/analytics/answer/6004245',needConsent:true,cookies:['_ga','_gat','_gid','__utma','__utmb','__utmc','__utmt','__utmz'],js:function(){window.GoogleAnalyticsObject='ga';window.ga=window.ga||function(){window.ga.q=window.ga.q||[];window.ga.q.push(arguments);};window.ga.l=new Date();tarteaucitron.addScript('https://www.google-analytics.com/analytics.js','',function(){ga('create',globs.wdl.googleAnalyticsId,'auto',{cookieExpires:34128000});ga('set','allowAdFeatures',false);ga('set','anonymizeIp',true);DTKR.trackPageView();});}};(tarteaucitron.job=tarteaucitron.job||[]).push('dgcAnalytics');}};window.DGC.CookieConsent.dgcSiteSupportCookies=function(tarteaucitron){'use strict';if(globs.wdl.siteSupportCookies){tarteaucitron.services.dgcSiteSupportCookies={key:'dgcSiteSupportCookies',type:'other',name:`${ globs.wdl.gameName || '' } Site Support Cookies`,needConsent:false,cookies:globs.wdl.siteSupportCookies,js:function(){window.DGC.CookieConsent.Helpers.whitelistCookies(tarteaucitron.services.dgcSiteSupportCookies.cookies);}};tarteaucitron.services.dgcSiteSupportCookies.js();}};window.DGC.CookieConsent.dgcSplitTestCookies=function(tarteaucitron){'use strict';if(globs.wdl.splitTestCookies){tarteaucitron.services.dgcSplitTestCookies={key:'dgcSplitTestCookies',type:'analytic',name:`${ globs.wdl.gameName || '' } Split Test Cookies`,needConsent:true,cookies:globs.wdl.splitTestCookies,js:function(){window.DGC.CookieConsent.Helpers.whitelistCookies(tarteaucitron.services.dgcSplitTestCookies.cookies);}};(tarteaucitron.job=tarteaucitron.job||[]).push('dgcSplitTestCookies');}};window.DGC.CookieConsent.sizmek=function(tarteaucitron){'use strict';function isSizmekPixel(text){return/onetagid=\d+/gi.test(text) || /versaTag\.id\s*=\s*.\d+/gi.test(text) || /serving-sys/gi.test(text);}
tarteaucitron.services.sizmek={key:'sizmek',type:'analytic',name:'Sizmek Tracking Pixel',uri:'https://www.sizmek.com/privacy-policy/',needConsent:true,cookies:[],js:function(){if(window.DGC.CookieConsent.Helpers.anyMatchingTags(isSizmekPixel)){window.DGC.CookieConsent.Helpers.consentToPageTags(isSizmekPixel);window.DGC.CookieConsent.Helpers.consentToLateTags(isSizmekPixel);}}};(tarteaucitron.job=tarteaucitron.job||[]).push('sizmek');};window.DGC.CookieConsent.twitterWidgetsApi=function(tarteaucitron){'use strict';(tarteaucitron.job=tarteaucitron.job||[]).push('twitterwidgetsapi');};window.DGC.CookieConsent.twitterPixel=function(tarteaucitron){'use strict';const twitterLoadPixelTest=/^\s*Twitter\s*:\s*([a-zA-Z0-9]+)\s*$/i;const isTwitterLoadPixel=twitterLoadPixelTest.test.bind(twitterLoadPixelTest);const twitterGeneralPixelTest=/twq\s*\(\s*['"](?:init|config|event)['"]\s*,\s*['"]([a-zA-Z0-9-]+)['"]/i;const isTwitterGeneralPixel=twitterGeneralPixelTest.test.bind(twitterGeneralPixelTest);if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)){const twitterPixels=globs.wdl.trackingPageLoadTags.filter(isTwitterLoadPixel);if(twitterPixels.length>0){const matches=twitterPixels[0].match(twitterLoadPixelTest);if(matches.length>=2){tarteaucitron.user.twitteruwtId=matches[1];(tarteaucitron.job=tarteaucitron.job||[]).push('twitteruwt');window.DGC.CookieConsent.Helpers.consentToLateTags(isTwitterGeneralPixel);}}}};window.DGC.CookieConsent.twitterConversionTracking=function(tarteaucitron){'use strict';tarteaucitron.services.twitterConversionTracking={key:'twitterConversionTracking',type:'ads',name:'Twitter Conversion Tracking',uri:'https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html',needConsent:true,cookies:[],js:function(){var twitterConversionPixelTest=/twttr\.conversion\.trackPid/i;var isTwitterConversionPixel=twitterConversionPixelTest.test.bind(twitterConversionPixelTest);tarteaucitron.addScript('https://platform.twitter.com/oct.js');window.DGC.CookieConsent.Helpers.consentToLateTags(isTwitterConversionPixel);}};(tarteaucitron.job=tarteaucitron.job||[]).push('twitterConversionTracking');};window.DGC.CookieConsent.facebookPixel=function(tarteaucitron){'use strict';const facebookPixelTest=/^\s*Facebook\s*:\s*([0-9]+)\s*$/i;const isFacebookPixel=facebookPixelTest.test.bind(facebookPixelTest);if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)){const facebookPixels=globs.wdl.trackingPageLoadTags.filter(isFacebookPixel);if(facebookPixels.length>0){const matches=facebookPixels[0].match(facebookPixelTest);if(matches.length>=2){tarteaucitron.user.facebookpixelId=matches[1];(tarteaucitron.job=tarteaucitron.job||[]).push('facebookpixel');}}}};window.DGC.CookieConsent.gtagPixel=function(tarteaucitron){'use strict';const gtagPixelTest=/gtag\s*\(/i;const gtagConfigPixelTest=/gtag\s*\(\s*['"]config['"]\s*,\s*['"]([a-zA-Z0-9-]+)['"]/i;const gtagAdwordsIdTest=/AW-\d+/i;const isGtagPixel=gtagPixelTest.test.bind(gtagPixelTest);const isGtagConfigPixel=gtagConfigPixelTest.test.bind(gtagConfigPixelTest);const isGtagAdwordsId=gtagAdwordsIdTest.test.bind(gtagAdwordsIdTest);const gtagConfigParams={allow_ad_personalization_signals:false,allow_google_signals:false,restricted_data_processing:true,ads_data_redaction:true,url_passthrough:false};if(globs.wdl.env!=='live'){gtagConfigParams.debug_mode=1;}
function isGtagNotAdwordsPixel(pixel){return isGtagPixel(pixel)&&!isGtagAdwordsId(pixel);}
function isGtagAdwordsPixel(pixel){return isGtagPixel(pixel)&&isGtagAdwordsId(pixel);}
let gtagUsePixels=[];let gtagUaUsePixels;let gtagAwUsePixels;tarteaucitron.user.multiplegtagUa=[];if(globs.wdl.googleAnalyticsIdGA4&&globs.wdl.googleAnalyticsIdGA4.trim().length>0){tarteaucitron.user.multiplegtagUa=globs.wdl.googleAnalyticsIdGA4.split(',');}
if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)&&globs.wdl.trackingPageLoadTags.length>0){const gtagPixels=globs.wdl.trackingPageLoadTags.filter(isGtagPixel);const gtagPixelTypes=window.DGC.CookieConsent.Helpers.partition(gtagPixels,isGtagConfigPixel);const gtagConfigPixels=gtagPixelTypes[0];gtagUsePixels=gtagPixelTypes[1];if(gtagConfigPixels.length>0){const configPixelIds=gtagConfigPixels.map(function(p){var matches=p.match(gtagConfigPixelTest);return matches.length>=2?matches[1]:undefined;}).filter(function(p){return Boolean(p);});tarteaucitron.user.multiplegtagUa=tarteaucitron.user.multiplegtagUa.concat(configPixelIds);}}
if(tarteaucitron.user.multiplegtagUa.length>0){[tarteaucitron.user.multiplegtagAw,tarteaucitron.user.multiplegtagUa]=window.DGC.CookieConsent.Helpers.partition(tarteaucitron.user.multiplegtagUa,isGtagAdwordsId);[gtagAwUsePixels,gtagUaUsePixels]=window.DGC.CookieConsent.Helpers.partition(gtagUsePixels,isGtagAdwordsId);tarteaucitron.user.gtagUaMore=function(){window.DGC.CookieConsent.Helpers.appendTags(gtagUaUsePixels);window.DGC.CookieConsent.Helpers.consentToLateTags(isGtagNotAdwordsPixel);};(tarteaucitron.job=tarteaucitron.job||[]).push('dgcMultiplegtagUa');if(tarteaucitron.user.multiplegtagAw.length>0){(tarteaucitron.job=tarteaucitron.job||[]).push('dgcMultiplegtagAw');tarteaucitron.user.gtagAwMore=function(){window.DGC.CookieConsent.Helpers.appendTags(gtagAwUsePixels);window.DGC.CookieConsent.Helpers.consentToLateTags(isGtagAdwordsPixel);};}}
tarteaucitron.services.dgcMultiplegtagUa={key:'dgcMultiplegtagUa',type:'analytic',name:'Google Analytics (gtag.js)',uri:'https://support.google.com/analytics/answer/6004245',needConsent:true,cookies:(function(){var cookies=['_ga','_gat','_gid','__utma','__utmb','__utmc','__utmt','__utmz'];if(tarteaucitron.user.multiplegtagUa!==undefined){tarteaucitron.user.multiplegtagUa.forEach(function(ua){cookies.push(`_gat_gtag_${ ua.replace(/-/g, '_') }`);cookies.push(`_ga_${ ua.replace(/G-/g, '') }`);});}
return cookies;}()),js:function(){if(tarteaucitron.user.multiplegtagUa!==undefined){window.dataLayer=window.dataLayer||[];var pixelsRemaining=tarteaucitron.user.multiplegtagUa.length;tarteaucitron.user.multiplegtagUa.forEach(function(ua){tarteaucitron.addScript(`https://www.googletagmanager.com/gtag/js?id=${ ua }`,'',function(){window.gtag=function gtag(){dataLayer.push(arguments);};gtag('consent','default',{ad_storage:'denied',analytics_storage:'granted',functionality_storage:'granted',personalization_storage:'denied',security_storage:'granted'});gtag('set','allow_ad_personalization_signals',false);gtag('set','allow_google_signals',false);gtag('set','restricted_data_processing',true);gtag('set','ads_data_redaction',true);gtag('set','url_passthrough',false);if(globs.wdl.env!=='live'){gtag('set','debug_mode',1);}
gtag('js',new Date());gtag('config',ua,gtagConfigParams);if(--pixelsRemaining===0&&typeof tarteaucitron.user.gtagUaMore==='function'){window.setTimeout(tarteaucitron.user.gtagUaMore,500);}});});}
if(tarteaucitron.launch.dgcMultiplegtagAw){tarteaucitron.services.dgcMultiplegtagAw.js();}}};tarteaucitron.services.dgcMultiplegtagAw={key:'dgcMultiplegtagAw',type:'ads',name:'Google Adwords Conversion',uri:'https://www.google.com/settings/ads',needConsent:true,cookies:[],js:function(){if(tarteaucitron.user.multiplegtagAw!==undefined&&tarteaucitron.launch.dgcMultiplegtagUa){window.dataLayer=window.dataLayer||[];var pixelsRemaining=tarteaucitron.user.multiplegtagAw.length;tarteaucitron.user.multiplegtagAw.forEach(function(aw){tarteaucitron.addScript(`https://www.googletagmanager.com/gtag/js?id=${ aw }`,'',function(){window.gtag=function gtag(){dataLayer.push(arguments);};gtag('consent','default',{ad_storage:'denied',analytics_storage:'granted',functionality_storage:'granted',personalization_storage:'denied',security_storage:'granted'});gtag('set','allow_ad_personalization_signals',false);gtag('set','allow_google_signals',false);gtag('set','restricted_data_processing',true);gtag('set','ads_data_redaction',true);gtag('set','url_passthrough',false);if(globs.wdl.env!=='live'){gtag('set','debug_mode',1);}
gtag('js',new Date());gtag('config',aw,gtagConfigParams);if(--pixelsRemaining===0&&typeof tarteaucitron.user.gtagAwMore==='function'){window.setTimeout(tarteaucitron.user.gtagAwMore,500);}});});}}};};window.DGC.CookieConsent.stackAdapt=function(tarteaucitron){'use strict';tarteaucitron.services.stackAdapt={key:'stackAdapt',type:'ads',name:'StackAdapt',uri:'https://www.stackadapt.com/privacy-policy',needConsent:true,cookies:[],js:function(){var stackAdaptPixelTest=/tags\.srv\.stackadapt\.com/i;var isStackAdaptPixel=stackAdaptPixelTest.test.bind(stackAdaptPixelTest);window.DGC.CookieConsent.Helpers.consentToPageTags(isStackAdaptPixel);window.DGC.CookieConsent.Helpers.consentToLateTags(isStackAdaptPixel);}};(tarteaucitron.job=tarteaucitron.job||[]).push('stackAdapt');};window.DGC.CookieConsent.basis=function(tarteaucitron){'use strict';const basisPixelTest=/cntrUpTag/i;const isBasisPixel=basisPixelTest.test.bind(basisPixelTest);tarteaucitron.services.basis={key:'basis',type:'ads',name:'Basis Technologies',uri:'https://privacy.basis.net/',needConsent:true,cookies:[],js:function(){if(window.DGC.CookieConsent.Helpers.anyMatchingTags(isBasisPixel)){tarteaucitron.addScript('https://up.pixel.ad/assets/up.js?um=1','',function(){window.DGC.CookieConsent.Helpers.consentToPageTags(isBasisPixel);window.DGC.CookieConsent.Helpers.consentToLateTags(isBasisPixel);});}}};(tarteaucitron.job=tarteaucitron.job||[]).push('basis');};window.DGC.CookieConsent.tikTok=function(tarteaucitron){'use strict';const tikTokLoadPixelTest=/^\s*TikTok\s*:\s*([A-Z0-9]+)\s*$/i;const isTikTokLoadPixel=tikTokLoadPixelTest.test.bind(tikTokLoadPixelTest);const tikTokGeneralPixelTest=/ttq\.(load|page|track|identify|)/i;const isTikTokGeneralPixel=tikTokGeneralPixelTest.test.bind(tikTokGeneralPixelTest);if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)){const tikTokPixels=globs.wdl.trackingPageLoadTags.filter(isTikTokLoadPixel);if(tikTokPixels.length>0){const matches=tikTokPixels[0].match(tikTokLoadPixelTest);if(matches.length>=2){tarteaucitron.user.tiktokId=matches[1];(tarteaucitron.job=tarteaucitron.job||[]).push('tiktok');window.DGC.CookieConsent.Helpers.consentToLateTags(isTikTokGeneralPixel);document.addEventListener('tiktok_added',function(){tarteaucitron.services.tiktok.cookies.push('_tt_enable_cookie','_ttp');});}}}};window.DGC.CookieConsent.redditPixel=function(tarteaucitron){'use strict';const redditPixelTest=/^\s*Reddit\s*:\s*([0-9a-z_]+)\s*$/i;const isRedditPixel=redditPixelTest.test.bind(redditPixelTest);if(globs.wdl.trackingPageLoadTags&&Array.isArray(globs.wdl.trackingPageLoadTags)){const redditPixels=globs.wdl.trackingPageLoadTags.filter(isRedditPixel);if(redditPixels.length>0){const matches=redditPixels[0].match(redditPixelTest);if(matches.length>=2){tarteaucitron.user.redditInit=matches[1];(tarteaucitron.job=tarteaucitron.job||[]).push('reddit');}}}};window.DGC.CookieConsent.amazonAds=function(tarteaucitron){'use strict';const amazonPixelTest=/amzn\s*\(/i;const isAmazonPixel=amazonPixelTest.test.bind(amazonPixelTest);tarteaucitron.services.amazonAds={key:'amazonAds',type:'ads',name:'Amazon Advertising Tag',uri:'https://advertising.amazon.com/legal/privacy-notice',needConsent:true,cookies:[],js:function(){if(window.DGC.CookieConsent.Helpers.anyMatchingTags(isAmazonPixel)){if(window.amzn){return;}
const a=window.amzn=function(){window.amzn.q.push([arguments,(new Date()).getTime()]);};a.q=[];a.version='0.0';tarteaucitron.addScript('https://c.amazon-adsystem.com/aat/amzn.js','amzn-pixel',function(){window.DGC.CookieConsent.Helpers.consentToPageTags(isAmazonPixel);window.DGC.CookieConsent.Helpers.consentToLateTags(isAmazonPixel);});}}};(tarteaucitron.job=tarteaucitron.job||[]).push('amazonAds');};(function(tarteaucitron){'use strict';if(!tarteaucitron){return;}
if(wpCookie('saw-cookie-preferences')==='true'){document.body.classList.add('saw-cookie-preferences');}
document.addEventListener('click',function(event){const closeButton=event.target.closest('#tarteaucitronClosePanel');if(closeButton&&this.contains(closeButton)){wpCookie('saw-cookie-preferences','true',365);document.body.classList.add('saw-cookie-preferences');}});window.addEventListener('tac.open_alert',function(){document.body.classList.add('tarteaucitron-visible');});window.addEventListener('tac.close_alert',function(){document.body.classList.remove('tarteaucitron-visible');});tarteaucitron.init({privacyUrl:globs.urls.privacyPolicyUrl,cookieUrl:globs.urls.cookiePolicyUrl,hashtag:'#cookieSettings',cookieName:'tarteaucitron',orientation:'bottom',showAlertSmall:false,cookieslist:true,showIcon:false,adblocker:false,AcceptAllCta:true,highPrivacy:true,handleBrowserDNTRequest:false,removeCredit:false,moreInfoLink:false,useExternalCss:false,readmoreLink:globs.urls.cookiePolicyUrl,mandatory:false});var modules=['youtubeApi','youtubeIframes','iframes','dgcGvid','dgcSiteSupportCookies'];if(globs.wdl.consentModulesAdd&&globs.wdl.consentModulesAdd.length>0){modules=_.union(modules,globs.wdl.consentModulesAdd);}
if(globs.wdl.consentModulesRemove&&globs.wdl.consentModulesRemove.length>0){modules=_.difference(modules,globs.wdl.consentModulesRemove);}
modules.forEach(function(module){if(typeof window.DGC.CookieConsent[module]==='function'){try{window.DGC.CookieConsent[module](tarteaucitron);}catch(e){console.error(e);}}});}(window.tarteaucitron));

/* end /web-platform/scripts/web-platform/track/cookie-consent.js*/

/* start /web-platform/scripts/web-platform/track/web-events.js*/
window.DGC??={};window.DGC.WebEvents=(function(){'use strict';function determineOS(){const userAgentLower=window.navigator.userAgent.toLowerCase();if(userAgentLower.includes('ipad')){return'ipad';}
if(userAgentLower.includes('iphone')){return'iphone';}
if(userAgentLower.includes('android')){return'android';}
if(userAgentLower.includes('linux')){return'linux';}
if(userAgentLower.includes('mac')){return'mac';}
if(userAgentLower.includes('windows')){return'windows';}
return'unknown';}
function download(overrides){const data={event:'GAME_DOWNLOAD',gameCode:globs.wdl.gameCode,identifiers:[`locale=${ window.navigator.language.replaceAll('-', '_') }`,`platform=${ determineOS() }`]};if(globs.urlparameters.gsid){data.gamesightId=globs.urlparameters.gsid;}
const params=['gsc','utm_source','utm_medium','utm_campaign','utm_term','utm_content'];const trackers=params.filter(p=>globs.urlparameters[p]).map(p=>`${ p }=${ globs.urlparameters[p] }`);if(trackers.length>0){data.trackers=trackers;}
const gvid=wpCookie('soegvid');if(gvid){data.gvid=Number(gvid);}
if(window.DGC?.WebEventsConfig?.id?.trim().length>0){data.accountId=Number(window.DGC.WebEventsConfig.id);}
if(window.DGC?.WebEventsConfig?.name?.trim().length>0){data.loginName=window.DGC.WebEventsConfig.name;}
$.ajax({url:globs.urls.eventsProxyUrl,type:'POST',dataType:'json',contentType:'application/json',data:JSON.stringify({...data,...overrides})});}
function appendGSIDs(firstRun){if(!globs.urlparameters.gsid){return;}
const params=['gsid','gsc','utm_source','utm_medium','utm_campaign','utm_term','utm_content'].filter(p=>globs.urlparameters[p]!==undefined);$('a[href]').each((i,el)=>{try{const href=new URL(el.href);if(href.origin===window.location.origin&&params.some(p=>href.searchParams.get(p)!==globs.urlparameters[p])){params.forEach(p=>href.searchParams.set(p,globs.urlparameters[p]));el.href=href;}}catch(e){}});if(firstRun){$('#autoLogIn input[name="service"]').each((i,el)=>{try{const href=new URL(el.getAttribute('value'));if(params.some(p=>href.searchParams.get(p)!==globs.urlparameters[p])){params.forEach(p=>href.searchParams.set(p,globs.urlparameters[p]));el.setAttribute('value',href);}}catch(e){}});}}
return{download,appendGSIDs};}());$(document).on('click','[href][data-web-event-download]',function(e){'use strict';e.preventDefault();const webEventOverrides={};if(this.hasAttribute('data-web-event-download-gamecode')){webEventOverrides.gameCode=this.getAttribute('data-web-event-download-gamecode');}
playNow.getInstaller({downloadURLOverride:this.getAttribute('href'),webEventOverrides});});$(document).ready(function(){'use strict';window.DGC.WebEvents.appendGSIDs(true);const debouncedAppendGSIDs=SOE.Utils.debounce(window.DGC.WebEvents.appendGSIDs.bind(null,false),250);const observer=new MutationObserver(debouncedAppendGSIDs);observer.observe(document,{childList:true,subtree:true,attributes:true,attributeFilter:['href']});});

/* end /web-platform/scripts/web-platform/track/web-events.js*/
